﻿#pragma once


// CMotorDlg 对话框

class CMotorDlg : public CDialogEx
{
	DECLARE_DYNAMIC(CMotorDlg)

public:
	CMotorDlg(CWnd* pParent = nullptr);   // 标准构造函数
	virtual ~CMotorDlg();

// 对话框数据
#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_DIALOG_MOTOR };
#endif

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持
	virtual BOOL OnInitDialog();
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnTimer(UINT_PTR nIDEvent);
	void ListAllAxis();
	void ShowCrtAxisMsg();
	void GetCrtAxisStatus();
public:
	CComboBox m_comboAxisNum;
	CEdit m_editCrtPos;
	CEdit m_editSpeedMove;
	CEdit m_editSpeedHome;
	CEdit m_editSpeedAcc;
	CEdit m_editReDis;
	CButton m_btnServoOn;
	CButton m_btnHome;
	CButton m_btnLmtP;
	CButton m_btnLmtN;
	CButton m_btnAlarm;
	CButton m_btnRDY;
	CButton m_btnINP;
	CButton m_bBtnServoOn;
	CEdit m_editStartSpeed;
	afx_msg void OnBnClickedBtnStop();
public:
	std::map<int, AXIS_SETTING> m_mapAxisSetting;
	AXIS_SETTING    m_crtAxisSetting;
	afx_msg void OnBnClickedButtonMove();
	CComboBox m_comboDirection;
	afx_msg void OnBnClickedBtnSave();
	afx_msg void OnBnClickedButtonResetAlarm();
	afx_msg void OnBnClickedButtonStepP();
	afx_msg void OnBnClickedButtonStepM();
	afx_msg void OnCbnSelchangeComboMotor();
	afx_msg void OnBnClickedButtonHome();
	afx_msg void OnBnClickedButtonAbs();
	afx_msg void OnBnClickedBtnServoOn();
	CEdit m_target;
	afx_msg void OnEnChangeEditAccspeed();
	afx_msg void OnBnClickedCheckServo();
};
